package drunkensailor.framework;

/**
 * The interface required to send a sailor through the shipyard.
 * Your custom sailor class should implement the Sailor interface then pass your sailor to the Simulation class.
 * @author William Barr
 */

public interface Sailor {
	/**
	 * The code in this method should determine in which direction the sailor should move each turn, given in one of the Directions.
	 * This method will be called for each turn when the sailor needs to move toward the ship in the RunSim method of the Simulation class.
	 * An invalid move (into a container wall) will result in the generation of an exception and will terminate the simulation.
	 *
	 * @param surroundings The states of the cells around the sailor.
	 * @param directionToShip The direction toward the ship.
	 * @return The direction in which to move the sailor.
	 */
	public Directions navigate(CellStates[][] surroundings, Directions directionToShip);
}
